using System.Text;
using UnityEngine;
using UnityEngine.UI;

public class HUDDebug : MonoBehaviour
{
	private static HUDDebug _instance;

	public Text txtContent;

	private void Awake()
	{
		if (!(_instance != null))
		{
			Application.RegisterLogCallback(AppendLog);
			Object.DontDestroyOnLoad(base.gameObject);
			_instance = this;
		}
	}

	private void Update()
	{
	}

	private void AppendLog(string condition, string stackTrace, LogType type)
	{
		StringBuilder stringBuilder = new StringBuilder();
		stringBuilder.Append(type.ToString());
		stringBuilder.Append(stackTrace);
		txtContent.text = stringBuilder.ToString();
	}
}
